<!--erp订单详情页面-->
<div id="erporderAllotPage" v-cloak>
    <el-dialog title="" :visible.sync="erporderAllotPageVisible" @closed="closeerporderAllotPage" fullscreen>
    <!-- 操作 start -->
    <div class="panel-default" style="display: block;margin-bottom: 10px;" align="center">
        <!-- 审核 -->
        <div style="padding: 5px 0;" class="container">
            <div class="row">
                <div>
                    <el-button size="small" class="pull-center" style="width: 100px;" @click="erporderAllotPageVisible = false;">返回</el-button>
                </div>
            </div>
        </div>
    </div>
    <!-- 操作 end -->

    <!-- 订单信息 start -->
    <el-row>
        <el-card class="box-card">
            <div slot="header" class="clearfix">
                <span>订单编号：&nbsp;&nbsp;{{orderInfo.orderId}}</span>
            </div>
            <div class="text item">
                <div class="row" style="line-height:30px;font-size: 12px;">
                    <div class="col-md-3">
                        <div class="row">
                            <div class="col-md-8 text-right">商品总额 ：</div>
                            <div class="col-md-4">{{orderInfo.totalAmount}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-8 text-right">运费 ：</div>
                            <div class="col-md-4">{{orderInfo.costFreight}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-8 text-right">支付金额 ：</div>
                            <div class="col-md-4">{{orderInfo.payed}}</div>
                        </div>

                    </div>
                    <div class="col-md-2">
                        <div class="row">
                            <div class="col-md-8 text-right">商品促销优惠 ：</div>
                            <div class="col-md-4">{{orderInfo.pmtGoods}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-8 text-right">优惠卷优惠 ：</div>
                            <div class="col-md-4">{{orderInfo.pmtOrder}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-8 text-right">随机立减 ：</div>
                            <div class="col-md-4">{{orderInfo.pmtRandom}}</div>
                        </div>
                    </div>
                    <div class="col-md-2">
                        <div class="row" style="line-height: 45px">
                            <div class="col-md-6 text-right">客服 ：</div>
                            <div class="col-md-6">
                                <el-select v-model="erpOrder.csId" filterable placeholder="请选择" size="mini">
                                    <el-option v-for="item in csIdList" :key="item.userId + ''" :label="item.username" :value="item.userId + ''" :disabled="item.disabled"></el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="row" style="line-height: 45px">
                            <div class="col-md-6 text-right">跟单员 ：</div>
                            <div class="col-md-6">
                                <el-select v-model="erpOrder.pmcId" filterable placeholder="请选择" size="mini">
                                    <el-option v-for="item in pmcIdList" :key="item.userId + ''" :label="item.username" :value="item.userId + ''" :disabled="item.disabled"></el-option>
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-5">
                        <div class="row">
                            <div class="col-md-3 text-right">审核人 ：</div>
                            <div class="col-md-4">{{erpOrder.auditNameVal}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-3 text-right">客户留言 ：</div>
                            <div class="col-md-9">
                                {{erpOrder.memo}}
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-3 text-right">客服备注 ：</div>
                            <div class="col-md-9">
                                <div class="box-body" style="line-height: 10px;margin-top: 10px;">
                                    <ul class="list-unstyled"  v-for="(remark, index) in remarkList">
                                        <li>
                                            <p style = "line-height:20px">
                                                {{remark.orCreateTime}} {{remark.orCreateNameVal}}： {{remark.orRemarks}}
                                            </p>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </el-card>
    </el-row>
    <!-- 订单信息 end -->

    <!-- 支付信息 start -->
    <el-row>
        <el-card class="box-card">
            <div slot="header" class="clearfix">
                <span>支付信息</span>
            </div>
            <div class="text item">
                <el-table border stripe ref="multipleTable" :data="userPaymentList"
                          tooltip-effect="dark" size="mini">
                    <el-table-column prop="paymentId" label="支付单号" align='center' header-align="center"></el-table-column>
                    <el-table-column prop="payName" label="支付类型" align='center' header-align="center"></el-table-column>
                    <el-table-column prop="money" label="支付金额" align='center' header-align="center"></el-table-column>
                    <el-table-column prop="tpayed" label="支付时间" align='center' header-align="center"></el-table-column>
                </el-table>
            </div>
        </el-card>
    </el-row>
    <!-- 支付信息 end -->

    <!-- 商品信息 start -->
    <el-row>
        <el-card class="box-card">
            <div slot="header" class="clearfix">
                <span>商品信息</span>
            </div>
            <div class="text item">
                <el-table border stripe ref="multipleTable" :data="erpOrderItemEntityList"
                          tooltip-effect="dark" size="mini">
                    <el-table-column prop="originalItemId" label="商品ID" width="80" align='center' header-align="center"></el-table-column>
                    <el-table-column prop="goodsId" label="SPU" width="80" align='center' header-align="center"></el-table-column>
                    <el-table-column prop="name" label="商品名称" show-overflow-tooltip align='center' header-align="center"></el-table-column>
                    <el-table-column prop="addon" label="规格/尺寸/材质/工艺" v-if="orderInfo.promotionType == 'procurement'" min-width="200px" header-align="center"></el-table-column>
                    <el-table-column prop="addon" label="规格/尺寸/材质/工艺" v-if="orderInfo.promotionType != 'procurement'" :formatter="formatAddon" min-width="200px" header-align="center"></el-table-column>
                    <el-table-column prop="amount" label="总额" width="80" align='center' header-align="center"></el-table-column>
                    <el-table-column prop="addcartBuyType" label="类型" width="80" align='center' header-align="center">
                        <template  slot-scope="scope">
                            <template v-if="scope.row.addcartBuyType == item.value" v-for="item in e.goodsTypeEnum">
                                {{item.describe}}
                            </template>
                        </template>
                    </el-table-column>
                    <el-table-column label="详情" width="80" align='center' header-align="center">
                        <template  slot-scope="scope">
                            <el-button type="text" size="small" @click="showItemDetail(scope.row)" :disabled="scope.row.addcartBuyType != 'print' && scope.row.addcartBuyType != 'fast'">查看</el-button>
                        </template>
                    </el-table-column>
                    <el-table-column prop="nums" label="数量" width="80" :formatter="formatNum" align='center' header-align="center"></el-table-column>
                    <el-table-column label="款式" width="80" align='center' header-align="center">
                        <template slot-scope="scope">
                            <span v-if="(scope.row.addcartBuyType == 'print' || scope.row.addcartBuyType == 'fast') && orderInfo.promotionType != 'procurement'">{{scope.row.nums}}</span>
                            <span v-else></span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="unit" label="单位" width="80" align='center' header-align="center"></el-table-column>
                    <el-table-column prop="allotStatus" label="分配状态" width="80" align='center' header-align="center">
                        <template slot-scope="scope">
                            {{scope.row.status == 1 ? '未分配' : '已分配'}}
                        </template>
                    </el-table-column>
                </el-table>
            </div>
        </el-card>
    </el-row>
    <!-- 商品信息 end -->

    <!-- 商品分配列表 start -->
    <el-row>
        <el-card class="box-card">
            <div slot="header" class="clearfix">
                <span>商品分配列表</span>
            </div>
            <div class="text item">
                <el-table border stripe ref="multipleTable" :data="erpOrderProductionList"
                          tooltip-effect="dark" size="mini">
                    <el-table-column type="index" label="序号" align='center' header-align="center"></el-table-column>
                    <el-table-column prop="orderItemId" label="商品ID" align='center' header-align="center"></el-table-column>
                    <el-table-column prop="erpItemName" label="商品名称" align='center' header-align="center"></el-table-column>
                    <el-table-column prop="attributeName" label="工艺" align='center' header-align="center"></el-table-column>
                    <el-table-column prop="producerName" label="供应商" align='center' header-align="center"></el-table-column>
                    <el-table-column prop="cost" label="分配价格" align='center' header-align="center"></el-table-column>
                    <el-table-column prop="allotType" label="分配类型" align='center' header-align="center"></el-table-column>
                    <el-table-column prop="isOwn" label="是否自做" align='center' header-align="center">
                        <template slot-scope="scope">
                            {{scope.row.isOwn == 1 ? '是' : '否'}}
                        </template>
                    </el-table-column>
                    <el-table-column prop="csRemark" label="备注" header-align="center"></el-table-column>
                    <el-table-column prop="productionOrder" label="第三方单号" align='center' header-align="center"></el-table-column>
                    <el-table-column v-if="showdeleteButton" label="操作" align='center' header-align="center">
                        <template slot-scope="scope">
                            <el-button type="text" @click="delAllotItem(scope.row)" size="small">删除</el-button>
                        </template>
                    </el-table-column>
                </el-table>
            </div>
        </el-card>
    </el-row>
    <!-- 商品分配列表 end -->

    <!-- 发票信息 start -->
        <el-row>
            <el-card class="box-card">
                <div slot="header" class="clearfix">
                    <span>发票信息</span>
                </div>
                <div class="text item">
                    <el-table border stripe ref="orderTaxTable" :data="orderTaxList"
                              tooltip-effect="dark" size="mini">
                        <!--<el-table-column prop="orderId" label="原始单号" align='center' header-align="center"></el-table-column>-->
                        <el-table-column prop="taxType" label="发票类型" :formatter="formatTaxType" align='center' header-align="center"></el-table-column>
                        <el-table-column prop="taxIdentification" label="纳税人识别号" align='center' header-align="center"></el-table-column>
                        <el-table-column prop="taxContent" label="发票内容" align='center' header-align="center"></el-table-column>
                        <el-table-column prop="taxAddr" label="注册地址" align='center' header-align="center"></el-table-column>
                        <el-table-column prop="taxCompany" label="发票抬头" align='center' header-align="center"></el-table-column>
                        <el-table-column prop="taxTel" label="注册电话" align='center' header-align="center"></el-table-column>
                        <el-table-column prop="taxAccountName" label="开户银行" align='center' header-align="center"></el-table-column>
                        <el-table-column prop="taxNumber" label="银行账户" align='center' header-align="center"></el-table-column>
                    </el-table>
                </div>
            </el-card>
        </el-row>
    <!-- 发票信息 end -->

    </el-dialog>

</div>
<!-- 报价商品算价详情 -->
<#include "/modules/order/itemQuoteDetail.html">
<script src="${request.contextPath}/statics/js/modules/production/erporderdetails.js?_${.now?long}"></script>